package com.atguigu.vo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class DataSourceClass {
    public DataSourceClass(String driver, String url, String username, String password) {
        this.driver = driver;
        this.url = url;
        this.username = username;
        this.password = password;
    }

    public DataSourceClass() {
    }

    @Value("${com.atguigu.driver}")
    private String driver;
    @Value("${com.atguigu.url}")
    private String url;
    @Value("${com.atguigu.username}")
    private String username;

    @Override
    public String toString() {
        return "DataSourceClass{" +
                "driver='" + driver + '\'' +
                ", url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    @Value("${com.atguigu.password}")
    private String password;
}
